﻿using System.Collections.Generic;
using System.Linq;
using ITTestingSystem.BusinessLogic.DataServices.Abstract;
using ITTestingSystem.Domain.Entities;

namespace ITTestingSystem.BusinessLogic.DataServices.Concrete
{
    public class TestService : BaseService<Test>, ITestService
    {
        private readonly IRepositoryForEntity<QuestionType> _questionTypeRepository;

        public TestService(IRepositoryForEntity<Test> testRepository, IRepositoryForEntity<QuestionType> questionTypeRepository)
            : base(testRepository)
        {
            _questionTypeRepository = questionTypeRepository;
        }

        IEnumerable<QuestionType> ITestService.GetQuestionTypes()
        {
            return _questionTypeRepository.GetAll().ToList();
        }
    }
}
